{#
/*
 * Copyright (c) 2024-2025 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
#}

class Consumer {
    static x1 = 0x41c64e6d;
    static x2 = 0xd431;
    static x3 = 1;

    static boola = false;
    static boolb = true;
    static chara = 'X';
    static charb = 'Y';
    static inta = 24;
    static intb = 53;
    static floata = 24.0;
    static floatb = 53.0;

    static localObj = new Object();
    static localObjs = [new Object()];
    static pseudorand = Date.now();

    static consumeBool(boolc) {
        if (boolc === this.boola && boolc === this.boolb) {
            throw new Error();
        }
    };

    static consumeChar(charc) {
        if (charc === this.chara && charc === this.charb) {
            throw new Error();
        }
    };

    static consumeInt(intc) {
        if (intc === this.inta && intc === this.intb) {
            throw new Error();
        }
    };

    static consumeFloat(floatc) {
        if (floatc === this.floata && floatc === this.floatb) {
            throw new Error();
        }
    };

    static consumeObj(obj) {
        this.pseudorand = (this.pseudorand * this.x1 + this.x2);
        if ((this.pseudorand & this.x3) === 0) {
            this.x3 = (this.x3 << 1) + 0xad;
            this.localObj = obj;
        }
    };

    static consumeObjs(objs) {
        this.pseudorand = (this.pseudorand * this.x1 + this.x2);
        if ((this.pseudorand & this.x3) === 0) {
            this.x3 = (this.x3 << 1) + 0xad;
            this.localObjs = objs;
        }
    };
};
